<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>opennars: nars.entity.Concept.linkToTask</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">opennars
   &#160;<span id="projectnumber">1.5.5</span>
   </div>
   <div id="projectbrief">1.5-ish</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../namespaces.html"><span>Packages</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d4/d22/classnars_1_1entity_1_1Concept_a501121a11fc046eea4b69720cb622d84.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="contents">
<a class="anchor" id="a501121a11fc046eea4b69720cb622d84"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void nars.entity.Concept.linkToTask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/ddc/classnars_1_1entity_1_1Task.html">Task</a>&#160;</td>
          <td class="paramname"><em>task</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Link to a new task from all relevant concepts for continued processing in the near future for unspecified time. </p>
<p>The only method that calls the <a class="el" href="../../d9/d27/classnars_1_1entity_1_1TaskLink.html" title="Reference to a Task. ">TaskLink</a> constructor. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">task</td><td>The task to be linked </td></tr>
    <tr><td class="paramname">content</td><td>The content of the task </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="../../df/d62/Concept_8java_source.html#l00181">181</a> of file <a class="el" href="../../df/d62/Concept_8java_source.html">Concept.java</a>.</p>

<p>References <a class="el" href="../../d8/d59/BudgetValue_8java_source.html#l00198">nars.entity.BudgetValue.aboveThreshold()</a>, <a class="el" href="../../df/d62/Concept_8java_source.html#l00281">nars.entity.Concept.buildTermLinks()</a>, <a class="el" href="../../de/d4e/BudgetFunctions_8java_source.html#l00169">nars.inference.BudgetFunctions.distributeAmongLinks()</a>, <a class="el" href="../../d9/de0/Item_8java_source.html#l00082">nars.entity.Item.getBudget()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00176">nars.storage.Memory.getConcept()</a>, and <a class="el" href="../../df/d62/Concept_8java_source.html#l00269">nars.entity.Concept.insertTaskLink()</a>.</p>

<p>Referenced by <a class="el" href="../../df/d62/Concept_8java_source.html#l00096">nars.entity.Concept.directProcess()</a>.</p>
<div class="fragment"><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;                                       {</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        BudgetValue taskBudget = task.getBudget();</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        TaskLink taskLink = <span class="keyword">new</span> TaskLink(task, null, taskBudget);   <span class="comment">// link type: SELF</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_aef21f5ae7bef5194bd37ae526302843d.html#aef21f5ae7bef5194bd37ae526302843d">insertTaskLink</a>(taskLink);</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a414c1b5d8ad3baa2ecdf65204b68d485.html#a414c1b5d8ad3baa2ecdf65204b68d485">term</a> instanceof CompoundTerm) {</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a201858931ec115680ef147dc4819d92b.html#a201858931ec115680ef147dc4819d92b">termLinkTemplates</a>.size() &gt; 0) {</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;                BudgetValue subBudget = BudgetFunctions.distributeAmongLinks(taskBudget, <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a201858931ec115680ef147dc4819d92b.html#a201858931ec115680ef147dc4819d92b">termLinkTemplates</a>.size());</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;                <span class="keywordflow">if</span> (subBudget.aboveThreshold()) {</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;                    Term componentTerm;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;                    <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a2aaa4a9fe0cb1841ba426f323a08b7eb.html#a2aaa4a9fe0cb1841ba426f323a08b7eb">Concept</a> componentConcept;</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;                    <span class="keywordflow">for</span> (TermLink termLink : <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a201858931ec115680ef147dc4819d92b.html#a201858931ec115680ef147dc4819d92b">termLinkTemplates</a>) {</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;<span class="comment">//                        if (!(task.isStructural() &amp;&amp; (termLink.getType() == TermLink.TRANSFORM))) { // avoid circular transform</span></div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;                        taskLink = <span class="keyword">new</span> TaskLink(task, termLink, subBudget);</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;                        componentTerm = termLink.getTarget();</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;                        componentConcept = <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">memory</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_a3f45cdc40973611106276cfbc27a7a7a.html#a3f45cdc40973611106276cfbc27a7a7a">getConcept</a>(componentTerm);</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;                        <span class="keywordflow">if</span> (componentConcept != null) {</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;                            componentConcept.<a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_aef21f5ae7bef5194bd37ae526302843d.html#aef21f5ae7bef5194bd37ae526302843d">insertTaskLink</a>(taskLink);</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;                        }</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;<span class="comment">//                        }</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;                    }</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;                    <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a3f3f026223e459e041fbdd8c0f49f7c6.html#a3f3f026223e459e041fbdd8c0f49f7c6">buildTermLinks</a>(taskBudget);  <span class="comment">// recursively insert TermLink</span></div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;                }</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;            }</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        }</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    }</div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a3f3f026223e459e041fbdd8c0f49f7c6_html_a3f3f026223e459e041fbdd8c0f49f7c6"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a3f3f026223e459e041fbdd8c0f49f7c6.html#a3f3f026223e459e041fbdd8c0f49f7c6">nars.entity.Concept.buildTermLinks</a></div><div class="ttdeci">void buildTermLinks(BudgetStruct taskBudget)</div><div class="ttdoc">Recursively build TermLinks between a compound and its components. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00281">Concept.java:281</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a2aaa4a9fe0cb1841ba426f323a08b7eb_html_a2aaa4a9fe0cb1841ba426f323a08b7eb"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a2aaa4a9fe0cb1841ba426f323a08b7eb.html#a2aaa4a9fe0cb1841ba426f323a08b7eb">nars.entity.Concept.Concept</a></div><div class="ttdeci">Concept(Term tm, Memory memory)</div><div class="ttdoc">Constructor, called in Memory.getConcept only. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00074">Concept.java:74</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a414c1b5d8ad3baa2ecdf65204b68d485_html_a414c1b5d8ad3baa2ecdf65204b68d485"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a414c1b5d8ad3baa2ecdf65204b68d485.html#a414c1b5d8ad3baa2ecdf65204b68d485">nars.entity.Concept.term</a></div><div class="ttdeci">Term term</div><div class="ttdoc">The term is the unique ID of the concept. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00050">Concept.java:50</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_a3f45cdc40973611106276cfbc27a7a7a_html_a3f45cdc40973611106276cfbc27a7a7a"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_a3f45cdc40973611106276cfbc27a7a7a.html#a3f45cdc40973611106276cfbc27a7a7a">nars.storage.Memory.getConcept</a></div><div class="ttdeci">Concept getConcept(Term term)</div><div class="ttdoc">Get the Concept associated to a Term, or create it. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00176">Memory.java:176</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c_html_a2ab0b0c82e09c852076ce4c90c502d4c"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">nars.entity.Concept.memory</a></div><div class="ttdeci">Memory memory</div><div class="ttdoc">Reference to the memory. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00063">Concept.java:63</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a201858931ec115680ef147dc4819d92b_html_a201858931ec115680ef147dc4819d92b"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a201858931ec115680ef147dc4819d92b.html#a201858931ec115680ef147dc4819d92b">nars.entity.Concept.termLinkTemplates</a></div><div class="ttdeci">ArrayList&lt; TermLink &gt; termLinkTemplates</div><div class="ttdoc">Link templates of TermLink, only in concepts with CompoundTerm jmv TODO explain more. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00057">Concept.java:57</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_aef21f5ae7bef5194bd37ae526302843d_html_aef21f5ae7bef5194bd37ae526302843d"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_aef21f5ae7bef5194bd37ae526302843d.html#aef21f5ae7bef5194bd37ae526302843d">nars.entity.Concept.insertTaskLink</a></div><div class="ttdeci">void insertTaskLink(TaskLink taskLink)</div><div class="ttdoc">Insert a TaskLink into the TaskLink bag. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00269">Concept.java:269</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d4/d22/classnars_1_1entity_1_1Concept_a501121a11fc046eea4b69720cb622d84_a501121a11fc046eea4b69720cb622d84_cgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

<p><div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d4/d22/classnars_1_1entity_1_1Concept_a501121a11fc046eea4b69720cb622d84_a501121a11fc046eea4b69720cb622d84_icgraph.svg" width="100%" height="388"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d7/d81/namespacenars.html">nars</a></li><li class="navelem"><a class="el" href="../../db/dec/namespacenars_1_1entity.html">entity</a></li><li class="navelem"><a class="el" href="../../d4/d22/classnars_1_1entity_1_1Concept.html">Concept</a></li>
    <li class="footer">Generated on Sun Jan 10 2016 18:03:59 for opennars by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
